Optimal. Leaf size=91 \[ -\frac {i \text {ArcTan}(a x)^3}{3 c}+\frac {\text {ArcTan}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1-i a x}\right )}{c}+\frac {\text {PolyLog}\left (3,-1+\frac {2}{1-i a x}\right )}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {5044, 4988,
5004, 5112, 6745} \begin {gather*} -\frac {i \text {ArcTan}(a x) \text {Li}_2\left (\frac {2}{1-i a x}-1\right )}{c}-\frac {i \text {ArcTan}(a x)^3}{3 c}+\frac {\text {ArcTan}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}+\frac {\text {Li}_3\left (\frac {2}{1-i a x}-1\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 4988
Rule 5004
Rule 5044
Rule 5112
Rule 6745
Rubi steps
\begin {align*} \int \frac {\tan ^{-1}(a x)^2}{x \left (c+a^2 c x^2\right )} \, dx &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {i \int \frac {\tan ^{-1}(a x)^2}{x (i+a x)} \, dx}{c}\\ &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {(2 a) \int \frac {\tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{c}+\frac {(i a) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=-\frac {i \tan ^{-1}(a x)^3}{3 c}+\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{c}+\frac {\text {Li}_3\left (-1+\frac {2}{1-i a x}\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(243\) vs. \(2(91)=182\).
time = 0.03, size = 243, normalized size = 2.67 \begin {gather*} \frac {i \text {ArcTan}(a x)^3}{3 c}+\frac {2 \text {ArcTan}(a x)^2 \tanh ^{-1}\left (1-\frac {2 i}{i-a x}\right )}{c}+\frac {\text {ArcTan}(a x)^2 \log \left (\frac {2 i}{i-a x}\right )}{c}+\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,\frac {-i-a x}{-i+a x}\right )}{c}+\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,-\frac {i+a x}{i-a x}\right )}{c}-\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,\frac {i+a x}{-i+a x}\right )}{c}+\frac {\text {PolyLog}\left (3,\frac {-i-a x}{-i+a x}\right )}{2 c}+\frac {\text {PolyLog}\left (3,-\frac {i+a x}{i-a x}\right )}{2 c}-\frac {\text {PolyLog}\left (3,\frac {i+a x}{-i+a x}\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.26, size = 1689, normalized size = 18.56
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1689\) |
default | \(\text {Expression too large to display}\) | \(1689\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\operatorname {atan}^{2}{\left (a x \right )}}{a^{2} x^{3} + x}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atan}\left (a\,x\right )}^2}{x\,\left (c\,a^2\,x^2+c\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________